#ifndef WHOLEPROGRESS_H
#define WHOLEPROGRESS_H
#include<QColor>
#include "algorithm"
#include "time.h"
#include "player.h"
#include "enemy.h"

typedef struct mydata {
    bool isAlive;    // 当前对象是否存活
    int  playerHp;
    int  playerMp;
    int  extraPower; // 额外增伤
    int  shield;     // 护盾
    int  isAct;      // 是否可以行动

    int enemyHp;
    int enemyMp;
} mydata;

class WholeProgress: public QObject {
    Q_OBJECT
public:

    WholeProgress(int playerType,
                  int diffi);
    player *playername;
    vector<enemy>wholeEnemy;
    enemy myEnemy;
    int playerT;
    vector<card>battleStart();
    bool        ifuse(int choice,
                      int type);
    mydata        dataReturn(int choice);
    void        selectProgress(int selectNumber);
    void        battleProgress();
    void        purchaseProgress(int);
    vector<card>updataCardList(int size);

    void        dealWithData(card,
                             mydata);
    void        dropCard(int);
    vector<card>reStartBattle();
    mydata        dataprocess(mydata curdata,
                            card useCard);

    vector<card>returnCardInHand();
public:
    card getACard();
signals:
    void showHurtNumber(QString a,int x,int y,int t,QColor c);
private:
};

#endif // WHOLEPROGRESS_H
